package com.huanf.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author: 35238
 * 功能: easyPoi-将数据库的数据写入到Excel表格。由于是写入到Excel，所以可以适当给Excel一个列宽
 * 时间: 2023-12-26 23:54
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("easy_poi")
public class WriteToExcelVo implements Serializable {
    @Excel(name = "编号")//name属性值必须跟表格那边对应，这个zidingyi_id字段才能从Excel拿到值
    private String id;//字段名自定义就好，不需要跟表格那边一致。字段类型必须跟表格那边一致，不知道就写String类型

    @Excel(name = "姓名", width = 15)
    private String name;

    @Excel(name = "生日", format = "yyyy-MM-dd HH:mm:ss", width = 23)
    private String bir;

    //如果是图片，type属性值必须为2，表示图片类型。把数据库的数据写入Excel，所以不需要写savePath
    @Excel(name = "头像图片", width = 22, height = 22,type = 2)
    private String avatar;

    @Excel(name = "年龄")
    private String age;

    @Excel(name = "爱好", width = 20)
    private String hobby;

    @Excel(name = "身份证号", width = 23)
    private String idCart;

    @Excel(name = "住址",width = 18)
    private String address;
}
